package com.dao;

import com.pojo.OrderItem;
import com.pojo.OrderItemExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface OrderItemMapper {
    long countByExample(OrderItemExample example);

    int deleteByExample(OrderItemExample example);

    int deleteByPrimaryKey(Integer oiId);

    int insert(OrderItem record);

    int insertSelective(OrderItem record);

    List<OrderItem> selectByExample(OrderItemExample example);

    OrderItem selectByPrimaryKey(Integer oiId);

    int updateByExampleSelective(@Param("record") OrderItem record, @Param("example") OrderItemExample example);

    int updateByExample(@Param("record") OrderItem record, @Param("example") OrderItemExample example);

    int updateByPrimaryKeySelective(OrderItem record);

    int updateByPrimaryKey(OrderItem record);

    //自定义方法
    //获取食品的orderitem
    public List<OrderItem> selectByExampleWithDish(OrderItemExample example);


    //根据外键订单编号，删除订单条目
    public int deleteItemsByOrderId(Integer oId);

    //根据订单的ID 获取食品
    public List<OrderItem> selectOrderItemByOid(Integer oId);





}